<script setup lang="ts">
import { ref, reactive } from "vue";
import type { FormRules, UploadProps } from "element-plus";
import ReCol from "@/components/ReCol";
import { FormProps } from "./types";
import { usePublicHooks } from "@/views/hooks";
import feedback from "@/utils/feedback";
import httpConfig from "@/utils/http/httpConfig";
import { Plus } from "@element-plus/icons-vue";
import axios from "axios";

import SingleUpload from "@/components/ReUpload/singleUpload.vue";

const props = withDefaults(defineProps<FormProps>(), {
  formInline: () => ({
    data: []
  })
});

const ruleFormRef = ref();
const { switchStyle } = usePublicHooks();
const newFormInline = ref(props.formInline);

function getRef() {
  return ruleFormRef.value;
}

defineExpose({ getRef });
</script>

<template>
  <el-timeline>
    <el-timeline-item
      v-for="(activity, index) in newFormInline.data"
      :key="index"
      :icon="activity.icon"
      :color="activity.color"
      :timestamp="activity.timestamp"
    >
      {{ activity.content }}
    </el-timeline-item>
  </el-timeline>
</template>
<style scoped>
.avatar-uploader .avatar {
  width: 178px;
  height: 178px;
  display: block;
}
</style>

<style>
.avatar-uploader .el-upload {
  border: 1px dashed var(--el-border-color);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--el-transition-duration-fast);
}

.avatar-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}

.el-icon.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  text-align: center;
}
</style>
